home *** CD-ROM | disk | FTP | other *** search
- #ifndef _WINCLASSDEF
- #define _WINCLASSDEF
-
- #include <stddef.h>
- #include <conio.h>
- #include "region.h"
-
-
- // The basic window class
- extern class win : public region
- {
- protected:
-
- static win *topwin; // Class variable holds top window
- static win *lastwin; // Last window
-
- // Cursor location when window isn't on top
- int oldx;
- int oldy;
-
- // Default screen color
- unsigned int color;
-
- // Pointer to next window on stack
- win *next; // Pointer to next window
- win *prev; // Previous window
-
- int margin; // Margins support borders on the windows
-
- // Private method to register top window
- void settop(void);
-
- public:
- // Methods:
- // Constructor:
- win(int x0=1,int y0=1,int x1=80,int y1=25,
- unsigned int clr=7,int mar=0);
-
- // Destructor. This is virtual to support boxwindows, etc.
- virtual ~win();
-
- // Force window to top of stack
- void maketop();
- };
-
- // Windows with borders
- extern class boxwin : public win
- {
- public:
- boxwin(int x0=2,int y0=2,int x1=79,int y1=24,
- unsigned int clr=7,int boxt=0);
- };
-
- // General purpose box drawing routine
- void draw_box(int type,int x0,int y0,int x1,int y1);
-
- #endif
-
-